<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Linux命令," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux磁盘管理好坏管理直接关系到整个系统的性能问题。 &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux磁盘管理常用三个命令为df、du和fdisk。  df：列出文件系统的整体磁盘使用量 du：检查磁盘空间使用量 fdisk：用于磁盘分区">
<meta name="keywords" content="Linux命令">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux 磁盘管理">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/2. Linux 命令/75. Linux 磁盘管理/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux磁盘管理好坏管理直接关系到整个系统的性能问题。 &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux磁盘管理常用三个命令为df、du和fdisk。  df：列出文件系统的整体磁盘使用量 du：检查磁盘空间使用量 fdisk：用于磁盘分区">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-09-01T08:38:37.977Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linux 磁盘管理">
<meta name="twitter:description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux磁盘管理好坏管理直接关系到整个系统的性能问题。 &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux磁盘管理常用三个命令为df、du和fdisk。  df：列出文件系统的整体磁盘使用量 du：检查磁盘空间使用量 fdisk：用于磁盘分区">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/2. Linux 命令/75. Linux 磁盘管理/"/>





  <title>Linux 磁盘管理 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/2. Linux 命令/75. Linux 磁盘管理/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Linux 磁盘管理</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T01:57:34+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Linux磁盘管理好坏管理直接关系到整个系统的性能问题。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Linux磁盘管理常用三个命令为df、du和fdisk。</p>
<ul>
<li>df：列出文件系统的整体磁盘使用量</li>
<li>du：检查磁盘空间使用量</li>
<li>fdisk：用于磁盘分区</li>
</ul>
<h2 id="df"><a href="#df" class="headerlink" title="df"></a>df</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;df命令参数功能：检查文件系统的磁盘空间占用情况。可以利用该命令来获取硬盘被占用了多少空间，目前还剩下多少空间等信息。</p>
<h3 id="语法："><a href="#语法：" class="headerlink" title="语法："></a>语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">df [-ahikHTm] [目录或文件名]</div></pre></td></tr></table></figure>
<h3 id="选项与参数："><a href="#选项与参数：" class="headerlink" title="选项与参数："></a>选项与参数：</h3><ul>
<li>-a ：列出所有的文件系统，包括系统特有的 /proc 等文件系统；</li>
<li>-k ：以 KBytes 的容量显示各文件系统；</li>
<li>-m ：以 MBytes 的容量显示各文件系统；</li>
<li>-h ：以人们较易阅读的 GBytes, MBytes, KBytes 等格式自行显示；</li>
<li>-H ：以 M=1000K 取代 M=1024K 的进位方式；</li>
<li>-T ：显示文件系统类型, 连同该 partition 的 filesystem 名称 (例如 ext3) 也列出；</li>
<li>-i ：不用硬盘容量，而以 inode 的数量来显示</li>
</ul>
<h3 id="使用实例"><a href="#使用实例" class="headerlink" title="使用实例"></a>使用实例</h3><h4 id="实例1：将系统内所有的文件系统列出来！"><a href="#实例1：将系统内所有的文件系统列出来！" class="headerlink" title="实例1：将系统内所有的文件系统列出来！"></a>实例1：将系统内所有的文件系统列出来！</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># df</span></div><div class="line">Filesystem      1K-blocks      Used Available Use% Mounted on</div><div class="line">/dev/hdc2         9920624   3823112   5585444  41% /</div><div class="line">/dev/hdc3         4956316    141376   4559108   4% /home</div><div class="line">/dev/hdc1          101086     11126     84741  12% /boot</div><div class="line">tmpfs              371332         0    371332   0% /dev/shm</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在 Linux 底下如果 df 没有加任何选项，那么默认会将系统内所有的 (不含特殊内存内的文件系统与 swap) 都以 1 Kbytes 的容量来列出来！</p>
<h4 id="实例2-将容量结果以易读的容量格式显示出来"><a href="#实例2-将容量结果以易读的容量格式显示出来" class="headerlink" title="实例2:将容量结果以易读的容量格式显示出来"></a>实例2:将容量结果以易读的容量格式显示出来</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># df -h</span></div><div class="line">Filesystem            Size  Used Avail Use% Mounted on</div><div class="line">/dev/hdc2             9.5G  3.7G  5.4G  41% /</div><div class="line">/dev/hdc3             4.8G  139M  4.4G   4% /home</div><div class="line">/dev/hdc1              99M   11M   83M  12% /boot</div><div class="line">tmpfs                 363M     0  363M   0% /dev/shm</div></pre></td></tr></table></figure>
<h4 id="实例3-将系统内的所有特殊文件格式及名称都列出来"><a href="#实例3-将系统内的所有特殊文件格式及名称都列出来" class="headerlink" title="实例3:将系统内的所有特殊文件格式及名称都列出来"></a>实例3:将系统内的所有特殊文件格式及名称都列出来</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># df -aT</span></div><div class="line">Filesystem    Type 1K-blocks    Used Available Use% Mounted on</div><div class="line">/dev/hdc2     ext3   9920624 3823112   5585444  41% /</div><div class="line">proc          proc         0       0         0   -  /proc</div><div class="line">sysfs        sysfs         0       0         0   -  /sys</div><div class="line">devpts      devpts         0       0         0   -  /dev/pts</div><div class="line">/dev/hdc3     ext3   4956316  141376   4559108   4% /home</div><div class="line">/dev/hdc1     ext3    101086   11126     84741  12% /boot</div><div class="line">tmpfs        tmpfs    371332       0    371332   0% /dev/shm</div><div class="line">none   binfmt_misc         0       0         0   -  /proc/sys/fs/binfmt_misc</div><div class="line">sunrpc  rpc_pipefs         0       0         0   -  /var/lib/nfs/rpc_pipefs</div></pre></td></tr></table></figure>
<h4 id="实例4-将-etc-底下的可用的磁盘容量以易读的容量格式显示"><a href="#实例4-将-etc-底下的可用的磁盘容量以易读的容量格式显示" class="headerlink" title="实例4:将 /etc 底下的可用的磁盘容量以易读的容量格式显示"></a>实例4:将 /etc 底下的可用的磁盘容量以易读的容量格式显示</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># df -h /etc</span></div><div class="line">Filesystem            Size  Used Avail Use% Mounted on</div><div class="line">/dev/hdc2             9.5G  3.7G  5.4G  41% /</div></pre></td></tr></table></figure>
<h2 id="du"><a href="#du" class="headerlink" title="du"></a>du</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Linux du命令也是查看使用空间的，但是与df命令不同的是Linux du命令是对文件和目录磁盘使用的空间的查看，还是和df命令有一些区别的，这里介绍Linux du命令。</p>
<h3 id="语法：-1"><a href="#语法：-1" class="headerlink" title="语法："></a>语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">du [-ahskm] 文件或目录名称</div></pre></td></tr></table></figure>
<h3 id="选项与参数：-1"><a href="#选项与参数：-1" class="headerlink" title="选项与参数："></a>选项与参数：</h3><ul>
<li>-a ：列出所有的文件与目录容量，因为默认仅统计目录底下的文件量而已。</li>
<li>-h ：以人们较易读的容量格式 (G/M) 显示；</li>
<li>-s ：列出总量而已，而不列出每个各别的目录占用容量；</li>
<li>-S ：不包括子目录下的总计，与 -s 有点差别。</li>
<li>-k ：以 KBytes 列出容量显示；</li>
<li>-m ：以 MBytes 列出容量显示；</li>
</ul>
<h3 id="实例1-列出目前目录下的所有文件容量"><a href="#实例1-列出目前目录下的所有文件容量" class="headerlink" title="实例1:列出目前目录下的所有文件容量"></a>实例1:列出目前目录下的所有文件容量</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># du</span></div><div class="line">8       ./test4     &lt;==每个目录都会列出来</div><div class="line">8       ./test2</div><div class="line">....中间省略....</div><div class="line">12      ./.gconfd   &lt;==包括隐藏文件的目录</div><div class="line">220     .           &lt;==这个目录(.)所占用的总量</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;直接输入 du 没有加任何选项时，则 du 会分析当前所在目录的文件与目录所占用的硬盘空间。</p>
<h3 id="实例2-将文件的容量也列出来"><a href="#实例2-将文件的容量也列出来" class="headerlink" title="实例2:将文件的容量也列出来"></a>实例2:将文件的容量也列出来</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># du -a</span></div><div class="line">12      ./install.log.syslog   &lt;==有文件的列表了</div><div class="line">8       ./.bash_logout</div><div class="line">8       ./test4</div><div class="line">8       ./test2</div><div class="line">....中间省略....</div><div class="line">12      ./.gconfd</div><div class="line">220     .</div></pre></td></tr></table></figure>
<h3 id="实例-3检查根目录底下每个目录所占用的容量"><a href="#实例-3检查根目录底下每个目录所占用的容量" class="headerlink" title="实例:3检查根目录底下每个目录所占用的容量"></a>实例:3检查根目录底下每个目录所占用的容量</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># du -sm /*</span></div><div class="line">7       /bin</div><div class="line">6       /boot</div><div class="line">.....中间省略....</div><div class="line">0       /proc</div><div class="line">.....中间省略....</div><div class="line">1       /tmp</div><div class="line">3859    /usr     &lt;==系统初期最大就是他了啦！</div><div class="line">77      /var</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;通配符 * 来代表每个目录。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;与 df 不一样的是，du 这个命令其实会直接到文件系统内去搜寻所有的文件数据。</p>
<h2 id="fdisk"><a href="#fdisk" class="headerlink" title="fdisk"></a>fdisk</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fdisk 是 Linux 的磁盘分区表操作工具。</p>
<h3 id="语法：-2"><a href="#语法：-2" class="headerlink" title="语法："></a>语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">fdisk [-l] 装置名称</div></pre></td></tr></table></figure>
<h3 id="选项与参数：-2"><a href="#选项与参数：-2" class="headerlink" title="选项与参数："></a>选项与参数：</h3><ul>
<li>-l ：输出后面接的装置所有的分区内容。若仅有 fdisk -l 时， 则系统将会把整个系统内能够搜寻到的装置的分区均列出来。</li>
</ul>
<h3 id="实例1-列出所有分区信息"><a href="#实例1-列出所有分区信息" class="headerlink" title="实例1:列出所有分区信息"></a>实例1:列出所有分区信息</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div></pre></td><td class="code"><pre><div class="line">[root@AY120919111755c246621 tmp]<span class="comment"># fdisk -l</span></div><div class="line"></div><div class="line">Disk /dev/xvda: 21.5 GB, 21474836480 bytes</div><div class="line">255 heads, 63 sectors/track, 2610 cylinders</div><div class="line">Units = cylinders of 16065 * 512 = 8225280 bytes</div><div class="line">Sector size (logical/physical): 512 bytes / 512 bytes</div><div class="line">I/O size (minimum/optimal): 512 bytes / 512 bytes</div><div class="line">Disk identifier: 0x00000000</div><div class="line"></div><div class="line">    Device Boot      Start         End      Blocks   Id  System</div><div class="line">/dev/xvda1   *           1        2550    20480000   83  Linux</div><div class="line">/dev/xvda2            2550        2611      490496   82  Linux swap / Solaris</div><div class="line"></div><div class="line">Disk /dev/xvdb: 21.5 GB, 21474836480 bytes</div><div class="line">255 heads, 63 sectors/track, 2610 cylinders</div><div class="line">Units = cylinders of 16065 * 512 = 8225280 bytes</div><div class="line">Sector size (logical/physical): 512 bytes / 512 bytes</div><div class="line">I/O size (minimum/optimal): 512 bytes / 512 bytes</div><div class="line">Disk identifier: 0x56f40944</div><div class="line"></div><div class="line">    Device Boot      Start         End      Blocks   Id  System</div><div class="line">/dev/xvdb2               1        2610    20964793+  83  Linux</div></pre></td></tr></table></figure>
<h3 id="实例2-找出你系统中的根目录所在磁盘，并查阅该硬盘内的相关信息"><a href="#实例2-找出你系统中的根目录所在磁盘，并查阅该硬盘内的相关信息" class="headerlink" title="实例2:找出你系统中的根目录所在磁盘，并查阅该硬盘内的相关信息"></a>实例2:找出你系统中的根目录所在磁盘，并查阅该硬盘内的相关信息</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># df /            &lt;==注意：重点在找出磁盘文件名而已</span></div><div class="line">Filesystem           1K-blocks      Used Available Use% Mounted on</div><div class="line">/dev/hdc2              9920624   3823168   5585388  41% /</div><div class="line"></div><div class="line">[root@www ~]<span class="comment"># fdisk /dev/hdc  &lt;==仔细看，不要加上数字喔！</span></div><div class="line">The number of cylinders <span class="keyword">for</span> this disk is <span class="built_in">set</span> to 5005.</div><div class="line">There is nothing wrong with that, but this is larger than 1024,</div><div class="line">and could <span class="keyword">in</span> certain setups cause problems with:</div><div class="line">1) software that runs at boot time (e.g., old versions of LILO)</div><div class="line">2) booting and partitioning software from other OSs</div><div class="line">   (e.g., DOS FDISK, OS/2 FDISK)</div><div class="line"></div><div class="line">Command (m <span class="keyword">for</span> <span class="built_in">help</span>):     &lt;==等待你的输入！</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;输入 m 后，就会看到底下这些命令介绍</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div></pre></td><td class="code"><pre><div class="line">Command (m <span class="keyword">for</span> <span class="built_in">help</span>): m   &lt;== 输入 m 后，就会看到底下这些命令介绍</div><div class="line">Command action</div><div class="line">   a   toggle a bootable flag</div><div class="line">   b   edit bsd disklabel</div><div class="line">   c   toggle the dos compatibility flag</div><div class="line">   d   delete a partition            &lt;==删除一个partition</div><div class="line">   l   list known partition types</div><div class="line">   m   <span class="built_in">print</span> this menu</div><div class="line">   n   add a new partition           &lt;==新增一个partition</div><div class="line">   o   create a new empty DOS partition table</div><div class="line">   p   <span class="built_in">print</span> the partition table     &lt;==在屏幕上显示分割表</div><div class="line">   q   quit without saving changes   &lt;==不储存离开fdisk程序</div><div class="line">   s   create a new empty Sun disklabel</div><div class="line">   t   change a partition<span class="string">'s system id</span></div><div class="line"><span class="string">   u   change display/entry units</span></div><div class="line"><span class="string">   v   verify the partition table</span></div><div class="line"><span class="string">   w   write table to disk and exit  &lt;==将刚刚的动作写入分割表</span></div><div class="line"><span class="string">   x   extra functionality (experts only)</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;离开 fdisk 时按下 q，那么所有的动作都不会生效！相反的， 按下w就是动作生效的意思。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line">Command (m <span class="keyword">for</span> <span class="built_in">help</span>): p  &lt;== 这里可以输出目前磁盘的状态</div><div class="line"></div><div class="line">Disk /dev/hdc: 41.1 GB, 41174138880 bytes        &lt;==这个磁盘的文件名与容量</div><div class="line">255 heads, 63 sectors/track, 5005 cylinders      &lt;==磁头、扇区与磁柱大小</div><div class="line">Units = cylinders of 16065 * 512 = 8225280 bytes &lt;==每个磁柱的大小</div><div class="line"></div><div class="line">   Device Boot      Start         End      Blocks   Id  System</div><div class="line">/dev/hdc1   *           1          13      104391   83  Linux</div><div class="line">/dev/hdc2              14        1288    10241437+  83  Linux</div><div class="line">/dev/hdc3            1289        1925     5116702+  83  Linux</div><div class="line">/dev/hdc4            1926        5005    24740100    5  Extended</div><div class="line">/dev/hdc5            1926        2052     1020096   82  Linux swap / Solaris</div><div class="line"><span class="comment"># 装置文件名 启动区否 开始磁柱    结束磁柱  1K大小容量 磁盘分区槽内的系统</span></div><div class="line"></div><div class="line">Command (m <span class="keyword">for</span> <span class="built_in">help</span>): q</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;想要不储存离开吗？按下 q 就对了！不要随便按 w 啊！</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;使用 p 可以列出目前这颗磁盘的分割表信息，这个信息的上半部在显示整体磁盘的状态。</p>
<h2 id="磁盘格式化"><a href="#磁盘格式化" class="headerlink" title="磁盘格式化"></a>磁盘格式化</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;磁盘分割完毕后自然就是要进行文件系统的格式化，格式化的命令非常的简单，使用 mkfs（make filesystem） 命令。</p>
<h3 id="语法：-3"><a href="#语法：-3" class="headerlink" title="语法："></a>语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mkfs [-t 文件系统格式] 装置文件名</div></pre></td></tr></table></figure>
<h3 id="选项与参数：-3"><a href="#选项与参数：-3" class="headerlink" title="选项与参数："></a>选项与参数：</h3><ul>
<li>-t ：可以接文件系统格式，例如 ext3, ext2, vfat 等(系统有支持才会生效)</li>
</ul>
<h3 id="实例1-查看-mkfs-支持的文件格式"><a href="#实例1-查看-mkfs-支持的文件格式" class="headerlink" title="实例1:查看 mkfs 支持的文件格式"></a>实例1:查看 mkfs 支持的文件格式</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># mkfs[tab][tab]</span></div><div class="line">mkfs         mkfs.cramfs  mkfs.ext2    mkfs.ext3    mkfs.msdos   mkfs.vfat</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;按下两个[tab]，会发现 mkfs 支持的文件格式如上所示。</p>
<h3 id="实例-将分区-dev-hdc6（可指定你自己的分区）-格式化为-ext3-文件系统："><a href="#实例-将分区-dev-hdc6（可指定你自己的分区）-格式化为-ext3-文件系统：" class="headerlink" title="实例:将分区 /dev/hdc6（可指定你自己的分区） 格式化为 ext3 文件系统："></a>实例:将分区 /dev/hdc6（可指定你自己的分区） 格式化为 ext3 文件系统：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># mkfs -t ext3 /dev/hdc6</span></div><div class="line">mke2fs 1.39 (29-May-2006)</div><div class="line">Filesystem label=                &lt;==这里指的是分割槽的名称(label)</div><div class="line">OS <span class="built_in">type</span>: Linux</div><div class="line">Block size=4096 (<span class="built_in">log</span>=2)          &lt;==block 的大小配置为 4K </div><div class="line">Fragment size=4096 (<span class="built_in">log</span>=2)</div><div class="line">251392 inodes, 502023 blocks     &lt;==由此配置决定的inode/block数量</div><div class="line">25101 blocks (5.00%) reserved <span class="keyword">for</span> the super user</div><div class="line">First data block=0</div><div class="line">Maximum filesystem blocks=515899392</div><div class="line">16 block groups</div><div class="line">32768 blocks per group, 32768 fragments per group</div><div class="line">15712 inodes per group</div><div class="line">Superblock backups stored on blocks:</div><div class="line">        32768, 98304, 163840, 229376, 294912</div><div class="line"></div><div class="line">Writing inode tables: <span class="keyword">done</span></div><div class="line">Creating journal (8192 blocks): <span class="keyword">done</span> &lt;==有日志记录</div><div class="line">Writing superblocks and filesystem accounting information: <span class="keyword">done</span></div><div class="line"></div><div class="line">This filesystem will be automatically checked every 34 mounts or</div><div class="line">180 days, whichever comes first.  Use tune2fs -c or -i to override.</div><div class="line"><span class="comment"># 这样就创建起来我们所需要的 Ext3 文件系统了！简单明了！</span></div></pre></td></tr></table></figure>
<h2 id="磁盘检验"><a href="#磁盘检验" class="headerlink" title="磁盘检验"></a>磁盘检验</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;fsck（file system check）用来检查和维护不一致的文件系统。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;若系统掉电或磁盘发生问题，可利用fsck命令对文件系统进行检查。</p>
<h3 id="语法：-4"><a href="#语法：-4" class="headerlink" title="语法："></a>语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">fsck [-t 文件系统] [-ACay] 装置名称</div></pre></td></tr></table></figure>
<h3 id="选项与参数：-4"><a href="#选项与参数：-4" class="headerlink" title="选项与参数："></a>选项与参数：</h3><ul>
<li>-t : 给定档案系统的型式，若在 /etc/fstab 中已有定义或 kernel 本身已支援的则不需加上此参数</li>
<li>-s : 依序一个一个地执行 fsck 的指令来检查</li>
<li>-A : 对/etc/fstab 中所有列出来的 分区（partition）做检查</li>
<li>-C : 显示完整的检查进度</li>
<li>-d : 打印出 e2fsck 的 debug 结果</li>
<li>-p : 同时有 -A 条件时，同时有多个 fsck 的检查一起执行</li>
<li>-R : 同时有 -A 条件时，省略 / 不检查</li>
<li>-V : 详细显示模式</li>
<li>-a : 如果检查有错则自动修复</li>
<li>-r : 如果检查有错则由使用者回答是否修复</li>
<li>-y : 选项指定检测每个文件是自动输入yes，在不确定那些是不正常的时候，可以执行 # fsck -y 全部检查修复。</li>
</ul>
<h3 id="实例1-查看系统有多少文件系统支持的-fsck-命令："><a href="#实例1-查看系统有多少文件系统支持的-fsck-命令：" class="headerlink" title="实例1:查看系统有多少文件系统支持的 fsck 命令："></a>实例1:查看系统有多少文件系统支持的 fsck 命令：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># fsck[tab][tab]</span></div><div class="line">fsck         fsck.cramfs  fsck.ext2    fsck.ext3    fsck.msdos   fsck.vfat</div></pre></td></tr></table></figure>
<h3 id="实例-强制检测-dev-hdc6-分区"><a href="#实例-强制检测-dev-hdc6-分区" class="headerlink" title="实例:强制检测 /dev/hdc6 分区:"></a>实例:强制检测 /dev/hdc6 分区:</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># fsck -C -f -t ext3 /dev/hdc6 </span></div><div class="line">fsck 1.39 (29-May-2006)</div><div class="line">e2fsck 1.39 (29-May-2006)</div><div class="line">Pass 1: Checking inodes, blocks, and sizes</div><div class="line">Pass 2: Checking directory structure</div><div class="line">Pass 3: Checking directory connectivity</div><div class="line">Pass 4: Checking reference counts</div><div class="line">Pass 5: Checking group summary information</div><div class="line">vbird_logical: 11/251968 files (9.1% non-contiguous), 36926/1004046 blocks</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;如果没有加上 -f 的选项，则由于这个文件系统不曾出现问题，检查的经过非常快速！若加上 -f 强制检查，才会一项一项的显示过程。</p>
<h2 id="磁盘挂载与卸除"><a href="#磁盘挂载与卸除" class="headerlink" title="磁盘挂载与卸除"></a>磁盘挂载与卸除</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Linux 的磁盘挂载使用 mount 命令，卸载使用 umount 命令。</p>
<h3 id="磁盘挂载语法："><a href="#磁盘挂载语法：" class="headerlink" title="磁盘挂载语法："></a>磁盘挂载语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mount [-t 文件系统] [-L Label名] [-o 额外选项] [-n]  装置文件名  挂载点</div></pre></td></tr></table></figure>
<h3 id="实例1-用默认的方式，将刚刚创建的-dev-hdc6-挂载到-mnt-hdc6-上面！"><a href="#实例1-用默认的方式，将刚刚创建的-dev-hdc6-挂载到-mnt-hdc6-上面！" class="headerlink" title="实例1:用默认的方式，将刚刚创建的 /dev/hdc6 挂载到 /mnt/hdc6 上面！"></a>实例1:用默认的方式，将刚刚创建的 /dev/hdc6 挂载到 /mnt/hdc6 上面！</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># mkdir /mnt/hdc6</span></div><div class="line">[root@www ~]<span class="comment"># mount /dev/hdc6 /mnt/hdc6</span></div><div class="line">[root@www ~]<span class="comment"># df</span></div><div class="line">Filesystem           1K-blocks      Used Available Use% Mounted on</div><div class="line">.....中间省略.....</div><div class="line">/dev/hdc6              1976312     42072   1833836   3% /mnt/hdc6</div></pre></td></tr></table></figure>
<h3 id="磁盘卸载命令-umount-语法："><a href="#磁盘卸载命令-umount-语法：" class="headerlink" title="磁盘卸载命令 umount 语法："></a>磁盘卸载命令 umount 语法：</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">umount [-fn] 装置文件名或挂载点</div></pre></td></tr></table></figure>
<h3 id="选项与参数：-5"><a href="#选项与参数：-5" class="headerlink" title="选项与参数："></a>选项与参数：</h3><ul>
<li>-f ：强制卸除！可用在类似网络文件系统 (NFS) 无法读取到的情况下；</li>
<li>-n ：不升级 /etc/mtab 情况下卸除。</li>
</ul>
<h3 id="卸载-dev-hdc6"><a href="#卸载-dev-hdc6" class="headerlink" title="卸载/dev/hdc6"></a>卸载/dev/hdc6</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">[root@www ~]<span class="comment"># umount /dev/hdc6</span></div></pre></td></tr></table></figure>
      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Linux命令/" rel="tag"># Linux命令</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/2. Linux 命令/10. Linux 命令- cat/" rel="next" title="Linux 命令- cat">
                <i class="fa fa-chevron-left"></i> Linux 命令- cat
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/2. Linux 命令/59. Linux 命令- ss/" rel="prev" title="Linux 命令- ss">
                Linux 命令- ss <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#df"><span class="nav-number">1.</span> <span class="nav-text">df</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#语法："><span class="nav-number">1.1.</span> <span class="nav-text">语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项与参数："><span class="nav-number">1.2.</span> <span class="nav-text">选项与参数：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#使用实例"><span class="nav-number">1.3.</span> <span class="nav-text">使用实例</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#实例1：将系统内所有的文件系统列出来！"><span class="nav-number">1.3.1.</span> <span class="nav-text">实例1：将系统内所有的文件系统列出来！</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#实例2-将容量结果以易读的容量格式显示出来"><span class="nav-number">1.3.2.</span> <span class="nav-text">实例2:将容量结果以易读的容量格式显示出来</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#实例3-将系统内的所有特殊文件格式及名称都列出来"><span class="nav-number">1.3.3.</span> <span class="nav-text">实例3:将系统内的所有特殊文件格式及名称都列出来</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#实例4-将-etc-底下的可用的磁盘容量以易读的容量格式显示"><span class="nav-number">1.3.4.</span> <span class="nav-text">实例4:将 /etc 底下的可用的磁盘容量以易读的容量格式显示</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#du"><span class="nav-number">2.</span> <span class="nav-text">du</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#语法：-1"><span class="nav-number">2.1.</span> <span class="nav-text">语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项与参数：-1"><span class="nav-number">2.2.</span> <span class="nav-text">选项与参数：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例1-列出目前目录下的所有文件容量"><span class="nav-number">2.3.</span> <span class="nav-text">实例1:列出目前目录下的所有文件容量</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例2-将文件的容量也列出来"><span class="nav-number">2.4.</span> <span class="nav-text">实例2:将文件的容量也列出来</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例-3检查根目录底下每个目录所占用的容量"><span class="nav-number">2.5.</span> <span class="nav-text">实例:3检查根目录底下每个目录所占用的容量</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#fdisk"><span class="nav-number">3.</span> <span class="nav-text">fdisk</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#语法：-2"><span class="nav-number">3.1.</span> <span class="nav-text">语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项与参数：-2"><span class="nav-number">3.2.</span> <span class="nav-text">选项与参数：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例1-列出所有分区信息"><span class="nav-number">3.3.</span> <span class="nav-text">实例1:列出所有分区信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例2-找出你系统中的根目录所在磁盘，并查阅该硬盘内的相关信息"><span class="nav-number">3.4.</span> <span class="nav-text">实例2:找出你系统中的根目录所在磁盘，并查阅该硬盘内的相关信息</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#磁盘格式化"><span class="nav-number">4.</span> <span class="nav-text">磁盘格式化</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#语法：-3"><span class="nav-number">4.1.</span> <span class="nav-text">语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项与参数：-3"><span class="nav-number">4.2.</span> <span class="nav-text">选项与参数：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例1-查看-mkfs-支持的文件格式"><span class="nav-number">4.3.</span> <span class="nav-text">实例1:查看 mkfs 支持的文件格式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例-将分区-dev-hdc6（可指定你自己的分区）-格式化为-ext3-文件系统："><span class="nav-number">4.4.</span> <span class="nav-text">实例:将分区 /dev/hdc6（可指定你自己的分区） 格式化为 ext3 文件系统：</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#磁盘检验"><span class="nav-number">5.</span> <span class="nav-text">磁盘检验</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#语法：-4"><span class="nav-number">5.1.</span> <span class="nav-text">语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项与参数：-4"><span class="nav-number">5.2.</span> <span class="nav-text">选项与参数：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例1-查看系统有多少文件系统支持的-fsck-命令："><span class="nav-number">5.3.</span> <span class="nav-text">实例1:查看系统有多少文件系统支持的 fsck 命令：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例-强制检测-dev-hdc6-分区"><span class="nav-number">5.4.</span> <span class="nav-text">实例:强制检测 /dev/hdc6 分区:</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#磁盘挂载与卸除"><span class="nav-number">6.</span> <span class="nav-text">磁盘挂载与卸除</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#磁盘挂载语法："><span class="nav-number">6.1.</span> <span class="nav-text">磁盘挂载语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例1-用默认的方式，将刚刚创建的-dev-hdc6-挂载到-mnt-hdc6-上面！"><span class="nav-number">6.2.</span> <span class="nav-text">实例1:用默认的方式，将刚刚创建的 /dev/hdc6 挂载到 /mnt/hdc6 上面！</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#磁盘卸载命令-umount-语法："><span class="nav-number">6.3.</span> <span class="nav-text">磁盘卸载命令 umount 语法：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项与参数：-5"><span class="nav-number">6.4.</span> <span class="nav-text">选项与参数：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#卸载-dev-hdc6"><span class="nav-number">6.5.</span> <span class="nav-text">卸载/dev/hdc6</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
